<?php /* Smarty version Smarty-3.0.7, created on 2012-06-06 09:24:05
         compiled from "E:\Project\Company\dus\shipinall.cn\Subversion\wwwroot/template/templates\mc/ordersheet/list.tpl" */ ?>
<?php /*%%SmartyHeaderCode:217084fceb135947572-48867181%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '7baaeb91d6d34207a05cc58abc9fbd1285fe383e' => 
    array (
      0 => 'E:\\Project\\Company\\dus\\shipinall.cn\\Subversion\\wwwroot/template/templates\\mc/ordersheet/list.tpl',
      1 => 1338945844,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '217084fceb135947572-48867181',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<?php if (!is_callable('smarty_function_math')) include 'E:\Project\Company\dus\shipinall.cn\Subversion\wwwroot\library\package\smarty\plugins\function.math.php';
?><script type="text/javascript" src="/scripts/apps/mc/ordersheet/list.js"></script>
<form id="Form_Ordersheet" name="Form_Ordersheet" action="/exec.php?action=mc_ordersheet_list" method="post" enctype="multipart/form-data">
    <table width="700" border="0" align="center" cellpadding="0" cellspacing="0" class="regBL">
    <tr>
        <td align="left" ><h2>订单管理</h2></td>
    </tr>
    </table>
    <br />
    <?php  $_smarty_tpl->tpl_vars["Row"] = new Smarty_Variable;
 $_from = ($_smarty_tpl->getVariable('Ordersheets')->value); if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars["Row"]->key => $_smarty_tpl->tpl_vars["Row"]->value){
?>
    <table width="700" border="0" align="center" cellpadding="2" cellspacing="0" style="border: solid #BEBEBE 1px; margin-bottom:10px;">
    <tr>
        <td width="25" height="25" align="center" valign="middle" bgcolor="#DEDEDE" style="border-bottom:solid #BEBEBE 1px;">
            <input type="checkbox" name="ID[]" id="ID" value="<?php echo $_smarty_tpl->getVariable('Row')->value['ID'];?>
" />
        </td>
        <td width="672" valign="middle" bgcolor="#DEDEDE" style="border-bottom:solid #BEBEBE 1px;">
        	订单编号：<?php echo $_smarty_tpl->getVariable('Row')->value['OrderNumber'];?>
&nbsp;&nbsp;&nbsp;下单时间：<?php echo $_smarty_tpl->getVariable('Row')->value['Datetime'];?>
&nbsp;&nbsp;&nbsp;<?php echo $_smarty_tpl->getVariable('Row')->value['CompanyName_Buyer'];?>

		</td>
    </tr>	
    <tr>
        <td colspan="2" align="right" bgcolor="#EEEEEE">
        	<table width="695" border="0" align="right" cellpadding="0" cellspacing="0">
            <tr>
                <td width="528">
                	<?php unset($_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['name'] = 'Supply';
$_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['loop'] = is_array($_loop=$_smarty_tpl->getVariable('Row')->value['Supplies']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['total']);
?>   
                	<table width="528" border="0" cellpadding="1" cellspacing="0">
                    <tr>
                        <td width="84" height="95" align="center" valign="middle"><a href="exec.php?action=mc_ordersheet_supply&id=<?php echo $_smarty_tpl->getVariable('Row')->value['Supplies'][$_smarty_tpl->getVariable('smarty')->value['section']['Supply']['index']]['ID'];?>
" target="_blank"><img src="<?php echo $_smarty_tpl->getVariable('Row')->value['Supplies'][$_smarty_tpl->getVariable('smarty')->value['section']['Supply']['index']]['Thumbnail'];?>
" width="80" height="80" /></a></td>
                        <td width="177" align="left" valign="top"><table width="165" border="0" align="center" cellpadding="0" cellspacing="0">
                            <tr>
                                <td height="2"></td>
                                </tr>
                            <tr>
                                <td><a href="exec.php?action=mc_ordersheet_supply&id=<?php echo $_smarty_tpl->getVariable('Row')->value['Supplies'][$_smarty_tpl->getVariable('smarty')->value['section']['Supply']['index']]['ID'];?>
" target="_blank">
                                    <?php echo $_smarty_tpl->getVariable('Row')->value['Supplies'][$_smarty_tpl->getVariable('smarty')->value['section']['Supply']['index']]['Title'];?>

                                </a></td>
                                </tr>
                            <tr>
                                <td>分类：
                                    <?php echo $_smarty_tpl->getVariable('Row')->value['Supplies'][$_smarty_tpl->getVariable('smarty')->value['section']['Supply']['index']]['ClassID'];?>

                                    -
                                    <?php echo $_smarty_tpl->getVariable('Row')->value['Supplies'][$_smarty_tpl->getVariable('smarty')->value['section']['Supply']['index']]['SubclassID'];?>
</td>
                                </tr>
                        </table></td>
                        <td width="80" align="center" style="border-left:solid #BEBEBE 1px;border-right:solid #BEBEBE 1px;">&yen;
                            <?php echo sprintf("%.2f",$_smarty_tpl->getVariable('Row')->value['Supplies'][$_smarty_tpl->getVariable('smarty')->value['section']['Supply']['index']]['Price']);?>
</td>
                        <td width="71" align="center" style="border-right:solid #BEBEBE 1px;"><?php echo $_smarty_tpl->getVariable('Row')->value['Supplies'][$_smarty_tpl->getVariable('smarty')->value['section']['Supply']['index']]['Amount'];?>

                            /
                            <?php echo $_smarty_tpl->getVariable('Row')->value['Supplies'][$_smarty_tpl->getVariable('smarty')->value['section']['Supply']['index']]['Unit'];?>
</td>
                        <td width="106" align="center" style="border-right:solid #BEBEBE 1px;">&yen;
                            <?php echo smarty_function_math(array('equation'=>"x*y",'x'=>$_smarty_tpl->getVariable('Row')->value['Supplies'][$_smarty_tpl->getVariable('smarty')->value['section']['Supply']['index']]['Price'],'y'=>$_smarty_tpl->getVariable('Row')->value['Supplies'][$_smarty_tpl->getVariable('smarty')->value['section']['Supply']['index']]['Amount'],'format'=>"%.2f"),$_smarty_tpl);?>
</td>
                        </tr>
                		</table>
                        <?php endfor; endif; ?>
                </td>
                <td width="102" align="center" valign="middle" style="border-right:solid #BEBEBE 1px;">
                	<?php if ($_smarty_tpl->getVariable('Row')->value['Status']=="SERVICES:000"){?>                    
                        <a href="/exec.php?action=mc_ordersheet_edit&id=<?php echo $_smarty_tpl->getVariable('Row')->value['ID'];?>
" target="_self">确认订单</a><br />
                    	<a href="/exec.php?action=mc_ordersheet_edit&id=<?php echo $_smarty_tpl->getVariable('Row')->value['ID'];?>
" target="_self">订单详情</a><br />
                        <a href="/exec.php?action=mc_logistics_info" target="_self">修改订单</a><br />
                        <a href="/exec.php?action=mc_logistics_info" target="_self">关闭订单</a>
					<?php }elseif($_smarty_tpl->getVariable('Row')->value['Status']=="SERVICES:001"){?>
                        <a href="/exec.php?action=mc_ordersheet_edit&id=<?php echo $_smarty_tpl->getVariable('Row')->value['ID'];?>
" target="_self">等待付款</a><br />
                    	<a href="/exec.php?action=mc_ordersheet_edit&id=<?php echo $_smarty_tpl->getVariable('Row')->value['ID'];?>
" target="_self">订单详情</a>
					<?php }elseif($_smarty_tpl->getVariable('Row')->value['Status']=="SERVICES:002"){?>
                        <a href="/exec.php?action=mc_ordersheet_edit&id=<?php echo $_smarty_tpl->getVariable('Row')->value['ID'];?>
" target="_self">确认到账</a><br />
                    	<a href="/exec.php?action=mc_ordersheet_edit&id=<?php echo $_smarty_tpl->getVariable('Row')->value['ID'];?>
" target="_self">订单详情</a>           
					<?php }elseif($_smarty_tpl->getVariable('Row')->value['Status']=="SERVICES:003"){?>
                        <a href="/exec.php?action=mc_ordersheet_edit&id=<?php echo $_smarty_tpl->getVariable('Row')->value['ID'];?>
" target="_self">发货</a><br />
                    	<a href="/exec.php?action=mc_ordersheet_edit&id=<?php echo $_smarty_tpl->getVariable('Row')->value['ID'];?>
" target="_self">订单详情</a>      
					<?php }elseif($_smarty_tpl->getVariable('Row')->value['Status']=="SERVICES:004"){?>
                        <a href="/exec.php?action=mc_ordersheet_edit&id=<?php echo $_smarty_tpl->getVariable('Row')->value['ID'];?>
" target="_self">等待确认收货</a><br />
                    	<a href="/exec.php?action=mc_ordersheet_edit&id=<?php echo $_smarty_tpl->getVariable('Row')->value['ID'];?>
" target="_self">订单详情</a>  
					<?php }elseif($_smarty_tpl->getVariable('Row')->value['Status']=="SERVICES:005"){?>
                        <a href="/exec.php?action=mc_ordersheet_edit&id=<?php echo $_smarty_tpl->getVariable('Row')->value['ID'];?>
" target="_self">交易成功</a><br />
                    	<a href="/exec.php?action=mc_ordersheet_edit&id=<?php echo $_smarty_tpl->getVariable('Row')->value['ID'];?>
" target="_self">订单详情</a>     
					<?php }elseif($_smarty_tpl->getVariable('Row')->value['Status']=="SERVICES:999"){?>
                        <a href="/exec.php?action=mc_ordersheet_edit&id=<?php echo $_smarty_tpl->getVariable('Row')->value['ID'];?>
" target="_self">交易关闭</a><br />
                    	<a href="/exec.php?action=mc_ordersheet_edit&id=<?php echo $_smarty_tpl->getVariable('Row')->value['ID'];?>
" target="_self">订单详情</a>     
					<?php }elseif($_smarty_tpl->getVariable('Row')->value['Status']=="SERVICES:998"){?>
                        <a href="/exec.php?action=mc_ordersheet_edit&id=<?php echo $_smarty_tpl->getVariable('Row')->value['ID'];?>
" target="_self">交易关闭</a><br />
                    	<a href="/exec.php?action=mc_ordersheet_edit&id=<?php echo $_smarty_tpl->getVariable('Row')->value['ID'];?>
" target="_self">订单详情</a>     
					<?php }elseif($_smarty_tpl->getVariable('Row')->value['Status']=="SERVICES:997"){?>
                        <a href="/exec.php?action=mc_ordersheet_edit&id=<?php echo $_smarty_tpl->getVariable('Row')->value['ID'];?>
" target="_self">交易关闭</a><br />
                    	<a href="/exec.php?action=mc_ordersheet_edit&id=<?php echo $_smarty_tpl->getVariable('Row')->value['ID'];?>
" target="_self">订单详情</a>    
					<?php }else{ ?>
                    	状态异常                                                                                                                                                                    
                    <?php }?>
                </td>
                <td width="65" align="center" valign="middle" style="border-right:solid #BEBEBE 1px;">
                    <?php if ($_smarty_tpl->getVariable('Row')->value['Status']=="SERVICES:999"||$_smarty_tpl->getVariable('Row')->value['Status']=="SERVICES:998"||$_smarty_tpl->getVariable('Row')->value['Status']=="SERVICES:997"){?>
	                    <a href="/exec.php?action=mc_ordersheet_list&id=<?php echo $_smarty_tpl->getVariable('Row')->value['ID'];?>
&do=delete" target="_self">删除</a>
                    <?php }else{ ?>
                    	<a style="color:#C0C0C0">删除</a>
					<?php }?>                    
                </td>
                </tr>
        	</table>            
        </td>
    </tr>
    </table>
    <?php }} ?>    
    <table width="700" border="0" align="center" cellpadding="3" cellspacing="0">
    <tr>
        <td align="center" bgcolor="#DEDEDE"><?php echo $_smarty_tpl->getVariable('PageMenu')->value;?>
</td>
    </tr>
    </table>
    <br />
</form>